{% extends "base_generic.html" %}

{% block title %}
  <title>{{author.first_name}} {{author.last_name}}</title>
{% endblock %}

{% block content %}
<h1>{{author.first_name}} {{author.last_name}}</h1>

<p><strong>Date of Birth: </strong>{{author.date_of_birth}}</p>
<p><strong>Date of Death: </strong>{{author.date_of_death}}</p>

<div style="margin-left:20px;margin-top:20px;">
  <h4>writing book：</h4>
  {% for copy in book.bookinstance_set.all %}
  <hr/>
  <p class="{% if copy.status == 'a' %}text-success{% elif copy.status == 'm' %}text-danger{% else %}text-warning{% endif %}">{{copy.get_status_display}}</p>
  <p><strong>Imprint:</strong>{{copy.imprint}}</p>
  <p class="text-muted"><strong>Id:</strong>{{copy.id}}</p>
  {% endfor %}
</div>
{% endblock %}
